package tf.common.jsonutils;

import com.alibaba.fastjson.JSON;

import java.util.ArrayList;
import java.util.List;

/**
 */
public class JSONUtils {
	public static <T> List<T> getJSONResult(String jsonString,
			Class<T> cls) {

		if (jsonString.equals("")) {
			return null;
		}

		List<T> jsonResult = new ArrayList<T>();

		jsonResult.addAll(JSON.parseArray(jsonString, cls));

		return jsonResult;
	}

}
